# makefile for build communication node
# laijun <laijun@nudt.edu.cn>
SHELL:=/bin/bash
WS_ROOT = $(shell pwd)
comm_ws = $(WS_ROOT)/catkin_communication_ws
mavcomm_ws = $(WS_ROOT)/catkin_libaugmavconn_ws

.PHONY : clean
all:
	echo "make all of the target file"
	rm -rf $(comm_ws)/devel $(comm_ws)/build  $(mavcomm_ws)/devel $(mavcomm_ws)/build
	cd $(mavcomm_ws);\
	catkin_make
	source $(mavcomm_ws)/devel/setup.bash;\
	cd $(comm_ws);\
	catkin_make;\
	echo  "$(tput setaf 1) Now you can source your code by typing"
	echo  "$(tput setab 7) source $(comm_ws)/devel/setup.bash $(tput sgr 0)"	
clean:
	echo "clean the workspace" 
	rm -rf $(comm_ws)/devel $(comm_ws)/build  $(mavcomm_ws)/devel $(mavcomm_ws)/build
	echo  "$(tput setaf 1) workspace clean"
